package com.aggron.concurrency.examples.publish;

import com.aggron.concurrency.annotations.NotRecommend;
import com.aggron.concurrency.annotations.NotThreadSafe;
import lombok.extern.slf4j.Slf4j;

/**
 * @author LR2SD
 * @description 逃逸发布对象,对象未完成之前不能将其发布
 * @date 2018-06-10 14:57
 */
@Slf4j
@NotThreadSafe
@NotRecommend
public class Escape {

    private Integer count=0;

    public Escape(){
        new InnerClass();
    }
    public class InnerClass{

        public InnerClass(){
            log.info("{}",Escape.this.count);
        }
    }

    public static void main(String [] args){
        new Escape();
    }

}
